home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
FDATE68A.ARJ
/
DO-ONCE.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-07-30
|
2KB
|
49 lines
@echo off
cls
goto EndDoc
----------------------------------------------------------------------
Run daily processing once a day. Put this code in AUTOEXEC.BAT.
This batch file requires DOS 3.3+, since it uses CALL.
If environment variable RAMDISK is set before running this batch
file, then it will use the RAM disk and run a bit faster.
----------------------------------------------------------------------
:EndDoc
if not exist C:\LASTRUN.BAT goto RunNow
rem get the date when this was last run
rem ------------------------------------------------------------------
call C:\LASTRUN.BAT
rem compare the date when this was last run to today's date
rem ------------------------------------------------------------------
Fdate /Fcomp /At /B%LastRun% /P"@SET comp=" >%RAMDISK%JUNKTEMP.BAT
call %RAMDISK%JUNKTEMP.BAT
del %RAMDISK%JUNKTEMP.BAT >nul
rem if today's date is greater than the date when this was last run,
rem then run the once-a-day processing now
rem ------------------------------------------------------------------
IF (%COMP%)==(GT) goto RunNow
goto NoRun
:RunNow
rem First, record the fact that this processing was run today
rem ----------------------------------------------------------------
Fdate /Ff /Omm-dd-ccyy /At /P"@set LastRun=">C:\LASTRUN.BAT
rem Second, run the jobs that should be run only once a day.
rem ----------------------------------------------------------------
REM REPLACE THE FOLLOWING LINES WITH LINES TO RUN THE JOBS THAT YOU
REM WANT RUN ONCE A DAY...........
echo RUNNING ONCE A DAY PROCESSING: Job 1
echo RUNNING ONCE A DAY PROCESSING: Job 2
echo RUNNING ONCE A DAY PROCESSING: ............. etc.
:NoRun
set LastRun=
set comp=